home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hackers Underworld 2: Forbidden Knowledge
/
Hackers Underworld 2: Forbidden Knowledge.iso
/
HACKING
/
HACKPASS.SHR
< prev
next >
Wrap
Text File
|
1994-07-17
|
36KB
|
1,600 lines
#! /bin/sh
# This is a shell archive. Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file". To overwrite existing
# files, type "sh file -c". You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g.. If this archive is complete, you
# will see the following message at the end:
# "End of archive 1 (of 1)."
# Contents: CRACK CRACK/Crack CRACK/DICTS CRACK/Makefile CRACK/PROGS
# CRACK/PROGS/-i CRACK/PROGS/Makefile CRACK/PROGS/crack-lib.c
# CRACK/PROGS/crack-pp.c CRACK/PROGS/crack-pwc.c CRACK/PROGS/crack.h
# CRACK/PROGS/sh.makedict CRACK/README CRACK/bad_pws.dat
# Wrapped by aem@aberda on Mon Jul 15 19:08:05 1991
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test ! -d 'CRACK' ; then
echo shar: Creating directory \"'CRACK'\"
mkdir 'CRACK'
fi
if test -f 'CRACK/Crack' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'CRACK/Crack'\"
else
echo shar: Extracting \"'CRACK/Crack'\" \(492 characters\)
sed "s/^X//" >'CRACK/Crack' <<'END_OF_FILE'
X#!/bin/csh
X
Xset op=hack-me.$$
Xset tmp=/tmp/pwf$$
Xset bin=PROGS
Xset dicts=DICTS
X
Xif ( "$1" == "" ) then
X echo "Usage: $0 passwdfile [passwdfile...]"
X exit 1
Xendif
X
Xecho "Crack 2.7a Password Cracker by ADE Muffett, 1991"
X
Xmake
X
Xcp /dev/null $tmp # "touch $tmp", "> $tmp", whatever...
X
Xforeach file ($*)
X awk '/^[A-Za-z0-9]/{print "'$file'" ":" $0}' < $file >> $tmp
Xend
X
Xecho "Backgrounding job. Output will be in $op"
X
Xsort -t: +2 $tmp | $bin/crack-pwc $dicts/dict.* >& $op &
X
Xsleep 5
X
Xrm $tmp
END_OF_FILE
if test 492 -ne `wc -c <'CRACK/Crack'`; then
echo shar: \"'CRACK/Crack'\" unpacked with wrong size!
fi
chmod +x 'CRACK/Crack'
# end of 'CRACK/Crack'
fi
if test ! -d 'CRACK/DICTS' ; then
echo shar: Creating directory \"'CRACK/DICTS'\"
mkdir 'CRACK/DICTS'
fi
if test -f 'CRACK/Makefile' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'CRACK/Makefile'\"
else
echo shar: Extracting \"'CRACK/Makefile'\" \(725 characters\)
sed "s/^X//" >'CRACK/Makefile' <<'END_OF_FILE'
X###
X# add other dictionaries here, relative to "."
X###
XDICTSRC= /usr/dict/words bad_pws.dat
X
X###
X# Not-so configurable bitz...
X###
XBINDIR= PROGS
XDICTDIR= DICTS
XPPDRIVER= $(BINDIR)/sh.makedict
XDICTSTAMP= $(DICTDIR)/dict-stamp
X
Xall: # I love recursion...
X ( cd $(BINDIR) ; make )
X ( make $(DICTSTAMP) )
X
X$(DICTSTAMP): $(PP) $(DICTSRC)
X $(PPDRIVER) $(DICTDIR) $(DICTSRC)
X touch $(DICTSTAMP)
X
Xtests:
X ( cd $(BINDIR) ; make tests )
X
Xalotfaster:
X ( cd $(BINDIR) ; make alotfaster )
X
Xclean:
X -( cd $(DICTDIR) && rm * )
X -rm die hack-me.* dict.?
X
Xspotless:
X ( cd $(BINDIR) && make clean )
X ( make clean )
X
Xprint:
X lpr -p Makefile \
X Crack \
X README \
X PROGS/Makefile \
X PROGS/*.h \
X PROGS/*.c \
X PROGS/sh.*
END_OF_FILE
if test 725 -ne `wc -c <'CRACK/Makefile'`; then
echo shar: \"'CRACK/Makefile'\" unpacked with wrong size!
fi
# end of 'CRACK/Makefile'
fi
if test ! -d 'CRACK/PROGS' ; then
echo shar: Creating directory \"'CRACK/PROGS'\"
mkdir 'CRACK/PROGS'
fi
if test -f 'CRACK/PROGS/-i' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'CRACK/PROGS/-i'\"
else
echo shar: Extracting \"'CRACK/PROGS/-i'\" \(0 characters\)
sed "s/^X//" >'CRACK/PROGS/-i' <<'END_OF_FILE'
END_OF_FILE
if test 0 -ne `wc -c <'CRACK/PROGS/-i'`; then
echo shar: \"'CRACK/PROGS/-i'\" unpacked with wrong size!
fi
# end of 'CRACK/PROGS/-i'
fi
if test -f 'CRACK/PROGS/Makefile' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'CRACK/PROGS/Makefile'\"
else
echo shar: Extracting \"'CRACK/PROGS/Makefile'\" \(513 characters\)
sed "s/^X//" >'CRACK/PROGS/Makefile' <<'END_OF_FILE'
X###
X# Configurtable bitz...
X###
XCFLAGS= -O2 # -Bstatic # (Static linking for SunOS fix)
X
X###
X# Not-so configurable bitz...
X###
XPWC= crack-pwc
XPP= crack-pp
X
X###
X# Positively hard to configure bitz...
X###
XCRACKMOD= crack-lib.o
X
Xall: $(PP) $(PWC)
X
X$(PP): $(PP).o $(CRACKMOD)
X $(CC) $(CFLAGS) -o $@ crack-pp.o $(CRACKMOD)
X
X$(PWC): $(PWC).o $(CRACKMOD)
X $(CC) $(CFLAGS) -o $@ crack-pwc.o $(CRACKMOD)
X
Xalotfaster:
X $(CC) -O4 -o $(PWC) \
X crack-pwc.c crack-lib.c
X
Xclean:
X -rm $(PP) $(PWC) *.o *.u $(DICTSTAMP)
END_OF_FILE
if test 513 -ne `wc -c <'CRACK/PROGS/Makefile'`; then
echo shar: \"'CRACK/PROGS/Makefile'\" unpacked with wrong size!
fi
# end of 'CRACK/PROGS/Makefile'
fi
if test -f 'CRACK/PROGS/crack-lib.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'CRACK/PROGS/crack-lib.c'\"
else
echo shar: Extracting \"'CRACK/PROGS/crack-lib.c'\" \(1764 characters\)
sed "s/^X//" >'CRACK/PROGS/crack-lib.c' <<'END_OF_FILE'
X#include "crack.h"
X
X/*
X * This program is copyright (c) Alec Muffett 1991 except for certain
X * portions of code ("fdes-crypt.c") copyright (c) Robert Baldwin, Icarus
X * Sparry and Alec Muffett. The author(s) disclaims all responsibility or
X * liability with respect to it's usage or its effect upon hardware or
X * computer systems. This software is in the public domain and is freely
X * redisrtibutable PROVIDED that this copyright notice remains intact.
X */
X
Xvoid
XTrim (string) /* remove trailing whitespace from a string */
X register char *string;
X{
X register char *ptr;
X
X for (ptr = string; *ptr; ptr++);
X while ((--ptr >= string) && isspace (*ptr));
X *(++ptr) = '\0';
X}
X
Xchar *
XReverse (str) /* return a pointer to a reversal */
X register char *str;
X{
X register int i;
X register int j;
X register char *ptr;
X static char area[STRINGSIZE];
X
X j = i = strlen (str);
X while (*str)
X {
X area[--i] = *str++;
X }
X area[j] = '\0';
X return (area);
X}
X
Xchar *
XUppercase (str) /* return a pointer to an uppercase */
X register char *str;
X{
X register char *ptr;
X static char area[STRINGSIZE];
X
X ptr = area;
X while (*str)
X {
X *(ptr++) = islower (*str) ? toupper (*str) : *str;
X str++;
X }
X *ptr = '\0';
X
X return (area);
X}
X
Xchar *
XLowercase (str) /* return a pointer to an lowercase */
X register char *str;
X{
X register char *ptr;
X static char area[STRINGSIZE];
X
X ptr = area;
X while (*str)
X {
X *(ptr++) = isupper (*str) ? tolower (*str) : *str;
X str++;
X }
X *ptr = '\0';
X
X return (area);
X}
X
Xchar *
XClone (string)
X char *string;
X{
X int len;
X char *retval;
X
X retval = (char *) malloc (strlen (string) + 1);
X strcpy (retval, string);
X return (retval);
X}
END_OF_FILE
if test 1764 -ne `wc -c <'CRACK/PROGS/crack-lib.c'`; then
echo shar: \"'CRACK/PROGS/crack-lib.c'\" unpacked with wrong size!
fi
# end of 'CRACK/PROGS/crack-lib.c'
fi
if test -f 'CRACK/PROGS/crack-pp.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'CRACK/PROGS/crack-pp.c'\"
else
echo shar: Extracting \"'CRACK/PROGS/crack-pp.c'\" \(3019 characters\)
sed "s/^X//" >'CRACK/PROGS/crack-pp.c' <<'END_OF_FILE'
X#include "crack.h"
X
X/*
X * This program is copyright (c) Alec Muffett 1991 except for certain
X * portions of code ("fdes-crypt.c") copyright (c) Robert Baldwin, Icarus
X * Sparry and Alec Muffett. The author(s) disclaims all responsibility or
X * liability with respect to it's usage or its effect upon hardware or
X * computer systems. This software is in the public domain and is freely
X * redisrtibutable PROVIDED that this copyright notice remains intact.
X */
X
X/* These used to be enums. Oh well... non-portability rules OK */
X#define ORDER_LCF 0
X#define ORDER_LCFP 1
X#define ORDER_MCF 2
X#define ORDER_UCF 3
X#define ORDER_LCB 4
X#define ORDER_UCB 5
X#define ORDER_MCB 6
X#define NUMFILES 7
X
Xint
Xmain (argc, argv)
X int argc;
X char *argv[];
X{
X register int i;
X register char *ptr;
X int all_digits;
X